package com.sz.stock.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class StockExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public StockExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andStockIdIsNull() {
            addCriterion("STOCK_ID is null");
            return (Criteria) this;
        }

        public Criteria andStockIdIsNotNull() {
            addCriterion("STOCK_ID is not null");
            return (Criteria) this;
        }

        public Criteria andStockIdEqualTo(Integer value) {
            addCriterion("STOCK_ID =", value, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdNotEqualTo(Integer value) {
            addCriterion("STOCK_ID <>", value, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdGreaterThan(Integer value) {
            addCriterion("STOCK_ID >", value, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("STOCK_ID >=", value, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdLessThan(Integer value) {
            addCriterion("STOCK_ID <", value, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdLessThanOrEqualTo(Integer value) {
            addCriterion("STOCK_ID <=", value, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdIn(List<Integer> values) {
            addCriterion("STOCK_ID in", values, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdNotIn(List<Integer> values) {
            addCriterion("STOCK_ID not in", values, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdBetween(Integer value1, Integer value2) {
            addCriterion("STOCK_ID between", value1, value2, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdNotBetween(Integer value1, Integer value2) {
            addCriterion("STOCK_ID not between", value1, value2, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockCodeIsNull() {
            addCriterion("STOCK_CODE is null");
            return (Criteria) this;
        }

        public Criteria andStockCodeIsNotNull() {
            addCriterion("STOCK_CODE is not null");
            return (Criteria) this;
        }

        public Criteria andStockCodeEqualTo(String value) {
            addCriterion("STOCK_CODE =", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeNotEqualTo(String value) {
            addCriterion("STOCK_CODE <>", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeGreaterThan(String value) {
            addCriterion("STOCK_CODE >", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeGreaterThanOrEqualTo(String value) {
            addCriterion("STOCK_CODE >=", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeLessThan(String value) {
            addCriterion("STOCK_CODE <", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeLessThanOrEqualTo(String value) {
            addCriterion("STOCK_CODE <=", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeLike(String value) {
            addCriterion("STOCK_CODE like", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeNotLike(String value) {
            addCriterion("STOCK_CODE not like", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeIn(List<String> values) {
            addCriterion("STOCK_CODE in", values, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeNotIn(List<String> values) {
            addCriterion("STOCK_CODE not in", values, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeBetween(String value1, String value2) {
            addCriterion("STOCK_CODE between", value1, value2, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeNotBetween(String value1, String value2) {
            addCriterion("STOCK_CODE not between", value1, value2, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCompanyIsNull() {
            addCriterion("STOCK_COMPANY is null");
            return (Criteria) this;
        }

        public Criteria andStockCompanyIsNotNull() {
            addCriterion("STOCK_COMPANY is not null");
            return (Criteria) this;
        }

        public Criteria andStockCompanyEqualTo(String value) {
            addCriterion("STOCK_COMPANY =", value, "stockCompany");
            return (Criteria) this;
        }

        public Criteria andStockCompanyNotEqualTo(String value) {
            addCriterion("STOCK_COMPANY <>", value, "stockCompany");
            return (Criteria) this;
        }

        public Criteria andStockCompanyGreaterThan(String value) {
            addCriterion("STOCK_COMPANY >", value, "stockCompany");
            return (Criteria) this;
        }

        public Criteria andStockCompanyGreaterThanOrEqualTo(String value) {
            addCriterion("STOCK_COMPANY >=", value, "stockCompany");
            return (Criteria) this;
        }

        public Criteria andStockCompanyLessThan(String value) {
            addCriterion("STOCK_COMPANY <", value, "stockCompany");
            return (Criteria) this;
        }

        public Criteria andStockCompanyLessThanOrEqualTo(String value) {
            addCriterion("STOCK_COMPANY <=", value, "stockCompany");
            return (Criteria) this;
        }

        public Criteria andStockCompanyLike(String value) {
            addCriterion("STOCK_COMPANY like", value, "stockCompany");
            return (Criteria) this;
        }

        public Criteria andStockCompanyNotLike(String value) {
            addCriterion("STOCK_COMPANY not like", value, "stockCompany");
            return (Criteria) this;
        }

        public Criteria andStockCompanyIn(List<String> values) {
            addCriterion("STOCK_COMPANY in", values, "stockCompany");
            return (Criteria) this;
        }

        public Criteria andStockCompanyNotIn(List<String> values) {
            addCriterion("STOCK_COMPANY not in", values, "stockCompany");
            return (Criteria) this;
        }

        public Criteria andStockCompanyBetween(String value1, String value2) {
            addCriterion("STOCK_COMPANY between", value1, value2, "stockCompany");
            return (Criteria) this;
        }

        public Criteria andStockCompanyNotBetween(String value1, String value2) {
            addCriterion("STOCK_COMPANY not between", value1, value2, "stockCompany");
            return (Criteria) this;
        }

        public Criteria andStockVolumeIsNull() {
            addCriterion("STOCK_VOLUME is null");
            return (Criteria) this;
        }

        public Criteria andStockVolumeIsNotNull() {
            addCriterion("STOCK_VOLUME is not null");
            return (Criteria) this;
        }

        public Criteria andStockVolumeEqualTo(Integer value) {
            addCriterion("STOCK_VOLUME =", value, "stockVolume");
            return (Criteria) this;
        }

        public Criteria andStockVolumeNotEqualTo(Integer value) {
            addCriterion("STOCK_VOLUME <>", value, "stockVolume");
            return (Criteria) this;
        }

        public Criteria andStockVolumeGreaterThan(Integer value) {
            addCriterion("STOCK_VOLUME >", value, "stockVolume");
            return (Criteria) this;
        }

        public Criteria andStockVolumeGreaterThanOrEqualTo(Integer value) {
            addCriterion("STOCK_VOLUME >=", value, "stockVolume");
            return (Criteria) this;
        }

        public Criteria andStockVolumeLessThan(Integer value) {
            addCriterion("STOCK_VOLUME <", value, "stockVolume");
            return (Criteria) this;
        }

        public Criteria andStockVolumeLessThanOrEqualTo(Integer value) {
            addCriterion("STOCK_VOLUME <=", value, "stockVolume");
            return (Criteria) this;
        }

        public Criteria andStockVolumeIn(List<Integer> values) {
            addCriterion("STOCK_VOLUME in", values, "stockVolume");
            return (Criteria) this;
        }

        public Criteria andStockVolumeNotIn(List<Integer> values) {
            addCriterion("STOCK_VOLUME not in", values, "stockVolume");
            return (Criteria) this;
        }

        public Criteria andStockVolumeBetween(Integer value1, Integer value2) {
            addCriterion("STOCK_VOLUME between", value1, value2, "stockVolume");
            return (Criteria) this;
        }

        public Criteria andStockVolumeNotBetween(Integer value1, Integer value2) {
            addCriterion("STOCK_VOLUME not between", value1, value2, "stockVolume");
            return (Criteria) this;
        }

        public Criteria andStockTurnoverIsNull() {
            addCriterion("STOCK_TURNOVER is null");
            return (Criteria) this;
        }

        public Criteria andStockTurnoverIsNotNull() {
            addCriterion("STOCK_TURNOVER is not null");
            return (Criteria) this;
        }

        public Criteria andStockTurnoverEqualTo(BigDecimal value) {
            addCriterion("STOCK_TURNOVER =", value, "stockTurnover");
            return (Criteria) this;
        }

        public Criteria andStockTurnoverNotEqualTo(BigDecimal value) {
            addCriterion("STOCK_TURNOVER <>", value, "stockTurnover");
            return (Criteria) this;
        }

        public Criteria andStockTurnoverGreaterThan(BigDecimal value) {
            addCriterion("STOCK_TURNOVER >", value, "stockTurnover");
            return (Criteria) this;
        }

        public Criteria andStockTurnoverGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("STOCK_TURNOVER >=", value, "stockTurnover");
            return (Criteria) this;
        }

        public Criteria andStockTurnoverLessThan(BigDecimal value) {
            addCriterion("STOCK_TURNOVER <", value, "stockTurnover");
            return (Criteria) this;
        }

        public Criteria andStockTurnoverLessThanOrEqualTo(BigDecimal value) {
            addCriterion("STOCK_TURNOVER <=", value, "stockTurnover");
            return (Criteria) this;
        }

        public Criteria andStockTurnoverIn(List<BigDecimal> values) {
            addCriterion("STOCK_TURNOVER in", values, "stockTurnover");
            return (Criteria) this;
        }

        public Criteria andStockTurnoverNotIn(List<BigDecimal> values) {
            addCriterion("STOCK_TURNOVER not in", values, "stockTurnover");
            return (Criteria) this;
        }

        public Criteria andStockTurnoverBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("STOCK_TURNOVER between", value1, value2, "stockTurnover");
            return (Criteria) this;
        }

        public Criteria andStockTurnoverNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("STOCK_TURNOVER not between", value1, value2, "stockTurnover");
            return (Criteria) this;
        }

        public Criteria andStockUpanddownsIsNull() {
            addCriterion("STOCK_UPANDDOWNS is null");
            return (Criteria) this;
        }

        public Criteria andStockUpanddownsIsNotNull() {
            addCriterion("STOCK_UPANDDOWNS is not null");
            return (Criteria) this;
        }

        public Criteria andStockUpanddownsEqualTo(BigDecimal value) {
            addCriterion("STOCK_UPANDDOWNS =", value, "stockUpanddowns");
            return (Criteria) this;
        }

        public Criteria andStockUpanddownsNotEqualTo(BigDecimal value) {
            addCriterion("STOCK_UPANDDOWNS <>", value, "stockUpanddowns");
            return (Criteria) this;
        }

        public Criteria andStockUpanddownsGreaterThan(BigDecimal value) {
            addCriterion("STOCK_UPANDDOWNS >", value, "stockUpanddowns");
            return (Criteria) this;
        }

        public Criteria andStockUpanddownsGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("STOCK_UPANDDOWNS >=", value, "stockUpanddowns");
            return (Criteria) this;
        }

        public Criteria andStockUpanddownsLessThan(BigDecimal value) {
            addCriterion("STOCK_UPANDDOWNS <", value, "stockUpanddowns");
            return (Criteria) this;
        }

        public Criteria andStockUpanddownsLessThanOrEqualTo(BigDecimal value) {
            addCriterion("STOCK_UPANDDOWNS <=", value, "stockUpanddowns");
            return (Criteria) this;
        }

        public Criteria andStockUpanddownsIn(List<BigDecimal> values) {
            addCriterion("STOCK_UPANDDOWNS in", values, "stockUpanddowns");
            return (Criteria) this;
        }

        public Criteria andStockUpanddownsNotIn(List<BigDecimal> values) {
            addCriterion("STOCK_UPANDDOWNS not in", values, "stockUpanddowns");
            return (Criteria) this;
        }

        public Criteria andStockUpanddownsBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("STOCK_UPANDDOWNS between", value1, value2, "stockUpanddowns");
            return (Criteria) this;
        }

        public Criteria andStockUpanddownsNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("STOCK_UPANDDOWNS not between", value1, value2, "stockUpanddowns");
            return (Criteria) this;
        }

        public Criteria andStockTotalpriceIsNull() {
            addCriterion("STOCK_TOTALPRICE is null");
            return (Criteria) this;
        }

        public Criteria andStockTotalpriceIsNotNull() {
            addCriterion("STOCK_TOTALPRICE is not null");
            return (Criteria) this;
        }

        public Criteria andStockTotalpriceEqualTo(BigDecimal value) {
            addCriterion("STOCK_TOTALPRICE =", value, "stockTotalprice");
            return (Criteria) this;
        }

        public Criteria andStockTotalpriceNotEqualTo(BigDecimal value) {
            addCriterion("STOCK_TOTALPRICE <>", value, "stockTotalprice");
            return (Criteria) this;
        }

        public Criteria andStockTotalpriceGreaterThan(BigDecimal value) {
            addCriterion("STOCK_TOTALPRICE >", value, "stockTotalprice");
            return (Criteria) this;
        }

        public Criteria andStockTotalpriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("STOCK_TOTALPRICE >=", value, "stockTotalprice");
            return (Criteria) this;
        }

        public Criteria andStockTotalpriceLessThan(BigDecimal value) {
            addCriterion("STOCK_TOTALPRICE <", value, "stockTotalprice");
            return (Criteria) this;
        }

        public Criteria andStockTotalpriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("STOCK_TOTALPRICE <=", value, "stockTotalprice");
            return (Criteria) this;
        }

        public Criteria andStockTotalpriceIn(List<BigDecimal> values) {
            addCriterion("STOCK_TOTALPRICE in", values, "stockTotalprice");
            return (Criteria) this;
        }

        public Criteria andStockTotalpriceNotIn(List<BigDecimal> values) {
            addCriterion("STOCK_TOTALPRICE not in", values, "stockTotalprice");
            return (Criteria) this;
        }

        public Criteria andStockTotalpriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("STOCK_TOTALPRICE between", value1, value2, "stockTotalprice");
            return (Criteria) this;
        }

        public Criteria andStockTotalpriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("STOCK_TOTALPRICE not between", value1, value2, "stockTotalprice");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}